package com.lwh.Test;


import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.lwh.DTO.SpecialFeeDTO;

/**
 * @author wanhua.li
 * @version 1.0
 * @description:特殊费用项测试类
 * @date 2023/1/6 17:54
 */
public class SpecialFeeTest {
    public static void main(String[] args) {
        // TODO: 2023/1/6 记得修改excel列名和DTO保持一致 
        String fileName = "D:\\政策包\\床日sql\\2022年单独计算点数的特殊药品.xlsx" ;
        EasyExcel.read(fileName, SpecialFeeDTO.class,new AnalysisEventListener<SpecialFeeDTO>() {

            @Override
                                                                                                                                                                                              public void invoke(SpecialFeeDTO specialFeeDTO, AnalysisContext context) {
                String teShuYoPinFei = "insert into CONFIG.P_TESHU_FEIYONG(CREATE_TIME,EFFECT_END_TIME,EFFECT_START_TIME,ID,RELATION_ID,UPDATE_TIME,VERSION,XIANGMU_BM,XIANGMU_MC) values (SYSDATE,to_date('2024-12-31 00:00:00','yyyy-MM-dd HH24:mi:ss'),to_date('2018-01-01 00:00:00','yyyy-MM-dd HH24:mi:ss'),'"+specialFeeDTO.getId()+"','2',SYSDATE,2,'"+specialFeeDTO.getMedicalInsuranceCode()+"','"+specialFeeDTO.getMedicalInsuranceName()+"');";
                System.out.println(teShuYoPinFei);
            }

            @Override
            public void doAfterAllAnalysed(AnalysisContext context) {

            }
        }).sheet().doRead();
    }

}
